﻿using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using Microsoft.Office.Interop.Excel;

using Think.Lenovo.Com.DataAccess.User;
using Think.Lenovo.Com.Models.Users;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            //User u = new User();
            //long x = u.AddUser(new UserModel());
            //Console.WriteLine(x);
            //UserInfo u = new UserInfo();
            //UserInfoModel model= new UserInfoModel();
            //model = u.GetUserInfo(1);
            //StringBuilder s = new StringBuilder();
            //Console.Write(s.Length);

            //List<int> list = new List<int>();
            //list.Add(1);
            //list.Add(2);
            //IEnumerator<int> ie = list.GetEnumerator();
            //while (ie.MoveNext())
            //{
            //    Console.Write(ie.Current + ",");
            //}
            #region
            /*
            String[] columns = new String[] { "name", "age", "grade" };
            DataSet ds = new DataSet("data");
            DataTable dt = new DataTable();
            foreach (String column in columns)
            {
                DataColumn d = new DataColumn(column);
                dt.Columns.Add(d);
            }
            DataRow row = dt.NewRow();
            foreach (String column in columns)
            {
                row[column] = "xxxxx";
            }
            dt.Rows.Add(row);
            ds.Tables.Add(dt);
            */
            #endregion

            Application app = new Application();
            Workbooks wbs = app.Workbooks;
            Workbook wb = wbs.Add(true);
            Worksheet s = (Worksheet)wb.Worksheets.Add(Type.Missing, Type.Missing, Type.Missing, Type.Missing);
            s.Name = "xue";
            Console.ReadLine();
        }
    }
}
